﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace CityLife
{
 

 
        /// <summary>
        /// A subclass of the Run element that exposes a DependencyProperty property
        /// to allow data binding.
        /// </summary>
        public class BindText : Inline
        {
            public static readonly DependencyProperty BoundTextProperty = DependencyProperty.Register("BoundText", typeof(string), typeof(BindText), new PropertyMetadata(new PropertyChangedCallback(BindText.onBoundTextChanged)));

            private static void onBoundTextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
            {
                ((Run)d).Text = (string)e.NewValue;
            }

            public String BoundText
            {
                get { return (string)GetValue(BoundTextProperty); }
                set { SetValue(BoundTextProperty, value); }
            }
        }
 
}
